package entity

import (
	"time"
	"wms/pb"
)

type StockIn struct {
	StockInID        int64          `gorm:"primaryKey;column:stock_in_id;type:bigint;not null"` //
	AuditStatus      pb.AuditStatus `gorm:"column:audit_status;type:tinyint unsigned"`          // 1待审核;2通过;3拒绝
	StockInNo        string         `gorm:"column:stock_in_no;type:varchar(128)"`               //
	StockInType      string         `gorm:"column:stock_in_type;type:varchar(32)"`              //
	StockInWarehouse string         `gorm:"column:stock_in_warehouse;type:varchar(32)"`         //
	Supplier         string         `gorm:"column:supplier;type:varchar(32)"`                   //
	ContractNo       string         `gorm:"column:contract_no;type:varchar(32)"`                //
	StockInTime      string         `gorm:"column:stock_in_time;type:varchar(32)"`              // 入库时间
	Staff            string         `gorm:"column:staff;type:varchar(64)"`                      // 入库人员
	Reviewer         string         `gorm:"column:reviewer;type:varchar(64)"`                   // 审核人员
	SkuList          []byte         `gorm:"column:sku_list;type:json"`                          //
	AuditAt          time.Time      `gorm:"column:audit_at;type:datetime;default:NULL"`         //
	CreatedAt        time.Time      `gorm:"column:created_at;type:datetime"`                    //
	UpdatedAt        time.Time      `gorm:"column:updated_at;type:datetime"`                    //
}

func (m *StockIn) TableName() string {
	return "stock_in"
}
